package com.wq.data.order.repository;

import com.wq.api.domain.entity.order.Product;
import com.wq.api.repository.order.ProductRepository;
import com.wq.data.order.dao.ProductMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by twinkle.zhou on 16/11/10.
 */
@Repository
@DubboService
public class ProductRepositoryImpl implements ProductRepository {

    @Autowired
    ProductMapper productMapper;

    @Override
    public Product findById(long productId){
        return productMapper.findById(productId);
    }

    @Override
    public List<Product> findByShopId(long shopId){
        return productMapper.findByShopId(shopId);
    }
}
